//
//  UnregisteredViewController.m
//  Showing
//
//  Created by Ralf on 4/23/15.
//  Copyright (c) 2015 next-software. All rights reserved.
//

#import "UnregisteredViewController.h"
#import "AppDelegate.h"
#import "iModern-Swift.h"

@interface UnregisteredViewController ()
{
    AppDelegate              *appDelegate;
    __weak IBOutlet UIButton *registerButton;
}
@end

@implementation UnregisteredViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
    appDelegate = (AppDelegate *) [[UIApplication sharedApplication] delegate];

    //    button!.backgroundColor = UIColor(red: 0.40784313725490196, green: 0.6588235294117647, blue: 0.19215686274509805, alpha: 1)

    UIColor *color = [UIColor colorWithRed:0.40784313725490196 green:0.6588235294117647 blue:0.19215686274509805 alpha:1];
    registerButton.layer.borderColor = [color CGColor];
}

- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
    [MobClick beginLogPageView:@"UnregisteredView"];
    appDelegate.rootController.navigationItem.rightBarButtonItem = nil;
    appDelegate.rootController.navigationItem.leftBarButtonItem  = nil;
    appDelegate.rootController.navigationItem.titleView          = nil;
    appDelegate.rootController.navigationItem.title              = @"登录";
}

- (void)viewWillDisappear:(BOOL)animated
{
    [super viewWillDisappear:animated];
    [MobClick endLogPageView:@"UnregisteredView"];
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/
- (IBAction)login:(id)sender
{
    LoginViewController *controller = [LoginViewController new];
    [self.navigationController pushViewController:controller animated:YES];
}

- (IBAction)register:(id)sender
{
    RegisterViewController *controller = [RegisterViewController new];
    [self.navigationController pushViewController:controller animated:YES];
}

@end
